package com.hs.srm.admin.modules.invoice.entity;

import java.io.Serializable;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import cn.afterturn.easypoi.excel.annotation.Excel;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hs.srm.base.common.annotation.DictMapping;
import com.hs.srm.base.common.base.CloneableEntity;
import com.hs.srm.base.common.utils.DictDataUtil.DictType;

/*
 * 发票数据头信息表
*/
@Getter
@Setter
@ToString
@TableName("scm_invoice_header")
public class ScmInvoiceHeaderEntity implements Serializable, CloneableEntity<ScmInvoiceHeaderEntity> {

	private static final long serialVersionUID = 1L;
	
	// 预制发票审核状态
	// 未操作0，预制发票审核通过1，开票通过2，预制发票审核未通过-1，开票未通过-2
	public static final class DealStatus {
		public static final int INIT = 0;
		public static final int YUZHI_PASS = 1;
		public static final int KAIPIAO_PASS = 2;
		public static final int YUZHI_FAIL = -1;
		public static final int KAIPIAO_FAIL = -2;
	}

	public ScmInvoiceHeaderEntity() {
		super();
	}

	/*
	 * 流水编号
	*/
	@TableId(type = IdType.UUID)
	@TableField("pk_id")
	@Excel(name = "流水编号", orderNum = "1")
	private java.lang.String pkId;

	/*
	 * 发票类型
	*/
	@TableField("invoice_type")
	@Excel(name = "发票类型", orderNum = "2")
	@DictMapping(type = DictType.FPLX)
	private java.lang.String invoiceType;

	/*
	 * 供应商发票号
	*/
	@TableField("invoice_no")
	@Excel(name = "供应商发票号", orderNum = "3")
	private java.lang.String invoiceNo;

	/*
	 * 对账单号
	*/
	@TableField("bill_no")
	@Excel(name = "对账单号", orderNum = "4")
	private java.lang.String billNo;

	/*
	 * 发票方
	*/
	@TableField("invoice_person")
	@Excel(name = "发票方id", orderNum = "5")
	private java.lang.String invoicePerson;

	/*
	 * 发票公司
	*/
	@TableField(exist = false)
	@Excel(name = "发票方编号", orderNum = "6")
	private java.lang.String vendorCode;

	/*
	 * 发票公司
	*/
	@TableField(exist = false)
	@Excel(name = "发票方名称", orderNum = "7")
	private java.lang.String vendorName;

	/*
	 * 发票公司
	*/
	@TableField(exist = false)
	private java.lang.String vendorId;

	/*
	 * 开票日期
	*/
	@TableField("date_kp")
	@Excel(name = "开票日期", orderNum = "8")
	@JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd hh:ss:mm")
	private java.util.Date dateKp;

	/*
	 * 付款日期
	*/
	@TableField("date_fk")
	@Excel(name = "付款日期", orderNum = "9")
	@JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd hh:ss:mm")
	private java.util.Date dateFk;

	/*
	 * 过账日期
	*/
	@TableField("date_gz")
	@Excel(name = "过账日期", orderNum = "10")
	@JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd hh:ss:mm")
	private java.util.Date dateGz;

	/*
	 * 付款条件
	*/
	@TableField("pay_condition")
	@Excel(name = "付款条件", orderNum = "11")
	@DictMapping(type = DictType.FKTJ)
	private java.lang.String payCondition;

	@TableField(exist = false)
	private java.lang.String payConditionText;

	/*
	 * 发票总额
	*/
	@TableField("sum_money")
	@Excel(name = "发票总额", orderNum = "12")
	private java.math.BigDecimal sumMoney;

	/*
	 * 凭证抬头文本
	*/
	@TableField("bk_txt")
	@Excel(name = "凭证抬头文本", orderNum = "13")
	private java.lang.String bkTxt;

	/*
	 * 税码
	*/
	@TableField("tax_code")
	@Excel(name = "税码", orderNum = "14")
	@DictMapping(type = DictType.SDM)
	private java.lang.String taxCode;

	/*
	 * 税码
	*/
	@TableField(exist = false)
	private java.lang.String taxCodeText;

	/*
	 * 税额
	*/
	@TableField("tax_money")
	@Excel(name = "税额", orderNum = "15")
	private java.math.BigDecimal taxMoney;

	/*
	 * 货币码
	*/
	@TableField("currency")
	@Excel(name = "货币码", orderNum = "16")
	@DictMapping(type = DictType.BZ)
	private java.lang.String currency;

	/*
	 * 货币码
	*/
	@TableField(exist = false)
	private java.lang.String currencyText;

	/*
	 * 处理状态（未操作0，通过1，未通过-1，已开票2）
	*/
	@TableField("deal_status")
	@Excel(name = "处理状态（未操作0，通过1，未通过-1，已开票2）", orderNum = "17")
	private java.lang.Integer dealStatus;

	/*
	 * 备注
	*/
	@TableField("remark")
	@Excel(name = "备注", orderNum = "18")
	private java.lang.String remark;

	/*
	 * 创建人
	*/
	@TableField("createdBy")
	@Excel(name = "创建人", orderNum = "19")
	private java.lang.String createdBy;

	/*
	 * 创建时间
	*/
	@TableField("creationDate")
	@Excel(name = "创建时间", orderNum = "20")
	@JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd hh:ss:mm")
	private java.util.Date creationDate;

	/*
	 * 更新人
	*/
	@TableField("lastUpdatedBy")
	@Excel(name = "更新人", orderNum = "21")
	private java.lang.String lastUpdatedBy;

	/*
	 * 更新时间
	*/
	@TableField("lastUpdateDate")
	@Excel(name = "更新时间", orderNum = "22")
	@JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
	@JSONField(format = "yyyy-MM-dd hh:ss:mm")
	private java.util.Date lastUpdateDate;
	/*
	 * 创建人
	 */
	@TableField("kjpzbh")
	@Excel(name = "预制发票号", orderNum = "23")
	private java.lang.String kjpzbh;

	@Override
	public ScmInvoiceHeaderEntity clone() {
		try {
			return (ScmInvoiceHeaderEntity)super.clone();
		} catch(CloneNotSupportedException ex) {
			// TODO Auto-generated catch block
			ex.printStackTrace();
		}
		return null;
	}
	
	
}
